<?php

/**
 * estudios actions.
 *
 * @package    nogoya
 * @subpackage estudios
 * @author     Your name here
 * @version    SVN: $Id: actions.class.php 2288 2006-10-02 15:22:13Z fabien $
 */
class estudiosActions extends autoestudiosActions
{
  protected function updateEstudioFromRequest(){
    $this->estudio->setActivo($this->getRequestParameter("activo"));
    parent::updateEstudioFromRequest();
  }
  public function executeComboEstudios(){
    $this->estudio_id = $this->getRequestParameter("estudio_id");
    $this->medico_id = $this->getRequestParameter("medico_id");
    if ($this->medico_id) {
      $estudios = EstudioPeer::getEstudiosByMedicoId($this->medico_id);
    } else {
      $estudios = EstudioPeer::getActivos();
    }
    $this->estudios = Objetos::_toArray($estudios);
  }
}
